import Fetch from "../../../utils/fetch";
import OAuthApi from "../../../api/OAuth";

// states
const state = {};
// actions
const actions = {
    findActionOfModule({}, routerPath) {
        return new Promise(resolve => {
            Fetch(OAuthApi.API_USER_MODULE_ACTIONS, {
                method: "get",
                query: { moduleUrl: routerPath },
            }).then(res => {
                resolve(res);
            });
        });
    },
};

// mutations
const mutations = {};

// getters
const getters = {};

export default {
    namespaced: true,
    state,
    getters,
    actions,
    mutations,
};
